package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author: lx
 * @Time: 10:49
 * @Description:
 */
@FeignClient(name = "service-cart")
public interface CartFeignClient {

    //加入购物车
    @GetMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    public void addToCart(@PathVariable Long skuId, @PathVariable Integer skuNum);
    @GetMapping("/api/cart/findCartInfoBySkuId/{skuId}")
    public CartInfo findCartInfoBySkuId(@PathVariable Long skuId);

    //商品清单 只查询选中的
    @GetMapping("/api/cart/findCartListByChecked")
    public List<CartInfo> findCartListByChecked();

}
